<template>
  <aside>
    <el-row :gutter="15">
      <!-- <el-col :span="3.5">
        <el-button type="primary" icon="el-icon-upload" size="mini" @click="creatLinkBtn">生成链接</el-button>
        <creat-link ref="creatLink" />
      </el-col> -->
      <el-col :span="2.5">
        <el-button type="primary" icon="el-icon-search" size="mini" @click="searchBtn">检索</el-button>
        <search-dialog ref="search" @searchFun="searchFun" />
      </el-col>
      <el-col :span="2.5">
        <el-button v-permission="['admin']" type="primary" icon="el-icon-download" size="mini" @click="downloadFun">导出</el-button>
      </el-col>
    </el-row>
  </aside>
</template>

<script>
import searchDialog from './search-dialog'
import permission from '@/directive/permission'
// import creatLink from './creat-link'
export default {
  directives: {
    permission
  },
  components: {
    searchDialog
    // creatLink
  },
  methods: {
    downloadFun() {
      this.$emit('exportExcel')
    },
    searchBtn() {
      this.$refs.search.dialogFormVisible = true
    },
    creatLinkBtn() {
      this.$refs.creatLink.dialogFormVisible = true
    },
    searchFun(val) {
      this.$emit('searchFun', val)
    }
  }
}
</script>

<style lang="scss" scoped>
 .el-button {
     width:100%;
 }
</style>
